package la.iok.hzsvn.lewin.movie.shopmovie.mapper;

import la.iok.hzsvn.lewin.movie.shopmovie.entity.Player;
import la.iok.hzsvn.lewin.movie.shopmovie.model.CarpoolPlayerCount;
import la.iok.hzsvn.lewin.movie.shopmovie.model.CarpoolReport;
import la.iok.hzsvn.lewin.movie.shopmovie.model.CarpoolReportCount;
import la.iok.hzsvn.lewin.mybatis.mapper.BaseMapper;
import la.iok.hzsvn.share.annotations.NotEmpty;
import la.iok.hzsvn.share.annotations.NotNull;
import la.iok.hzsvn.share.annotations.NotNullElement;
import la.iok.hzsvn.share.annotations.Nullable;

import java.util.Collection;
import java.util.List;

public interface PlayerMapper extends BaseMapper<Player> {
    List<Player> listOfCarpoolUsers(@NotNull @NotNullElement @NotEmpty Collection<Long> carpoolIds,
                                    @NotNull @NotNullElement @NotEmpty Collection<Long> userIds);

    @Nullable
    Player selectPlayer(@NotNull Long carpoolId, @NotNull Long userId);

    List<CarpoolPlayerCount> carpoolPlayerCounts(@NotNull @NotNullElement @NotEmpty Collection<Long> carpoolIds);

    List<CarpoolReportCount> playerCountReport(@Nullable Collection<Long> orgIds, @NotNull CarpoolReport report);
}
